package wsserver

// ISubscribeGroup 订阅频道组功能
type ISubscribeGroup interface {
	Name() string
	IClientsMgr
}

// FeatureSubscribeGroup ws订阅Group功能
type FeatureSubscribeGroup struct {
	group string
	IClientsMgr
}

func NewFeatureSubscribeGroup(name ...string) *FeatureSubscribeGroup {
	n := ""
	if len(name) > 0 {
		n = name[0]
	}
	return &FeatureSubscribeGroup{
		group:       n,
		IClientsMgr: NewClientsMgr(),
	}
}

func (g *FeatureSubscribeGroup) Name() string {
	return g.group
}

func (g *FeatureSubscribeGroup) SetName(n string) {
	g.group = n
}
